<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="js/ajax.js"></script>
    <script>
        function addCart(){
            var edu;
            if(a.checked){
                edu = a.value;
            }
            if(b.checked){
                edu = b.value;
            }
            if(c.checked){
                edu = c.value;
            }
            if(d.checked){
                edu = d.value;
            }
            console.info(edu);

            get("Getindex2Servlet?edu="+edu,
                function(res){
                    alert(res.msg);
                });
        }
    </script>
</head>
<body>
<form  accept-charset="UTF-8">
    你的学历: <input type="radio" name="edu" value="初中" id="a">初中
    <input type="radio" name="edu" value="高中" id="b">高中
    <input type="radio" name="edu" value="大专" id="c">大专
    <input type="radio" name="edu" value="本科" id="d">本科
    <br>
    <button type="button" onclick="addCart()">提交</button>
    <a href="index3.html">下一页</a>
</form>
</body>
</html>